/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
*                                                                        *
* Author: The ALICE Off-line Project.                                    *
* Contributors are mentioned in the code where appropriate.              *
*                                                                        *
* Permission to use, copy, modify and distribute this software and its   *
* documentation strictly for non-commercial purposes is hereby granted   *
* without fee, provided that the above copyright notice appears in all   *
* copies and that both the copyright notice and this permission notice   *
* appear in the supporting documentation. The authors make no claims     *
* about the suitability of this software for any purpose. It is          *
* provided "as is" without express or implied warranty.                  *
**************************************************************************/
//
//Xianguo Lu <lu@physi.uni-heidelberg.de>
//

#ifndef ALIANALYSISTASKTRDDEDX_H
#define ALIANALYSISTASKTRDDEDX_H

#ifndef ALIANALYSISTASKSE_H
#include "AliAnalysisTaskSE.h"
#endif

#include <TTreeStream.h>
#include "AliESDpid.h"

class AliESDEvent;
class AliESDfriend;
class TH1I;
class TList; 
class THnSparse;
class AliTPCseed;
class AliTRDtrackV1;
class TTreeSRedirector;

class AliAnalysisTaskESDTRDsignal : public AliAnalysisTaskSE
{
 public:
  
  AliAnalysisTaskESDTRDsignal();//const TString chunk);
  ~AliAnalysisTaskESDTRDsignal();
  void UserExec(Option_t *);
  void Terminate(Option_t *);

 private:
  Bool_t CutESD(Int_t &mag);
  Bool_t CutEvent();
  void CutTrack(Int_t &nsel, AliESDtrack *outtrk[]);

  Int_t GetPID(const AliESDtrack *trk);
  //TString fChunk;

  //TTreeSRedirector *fStream;
  TTreeStream *fStream;
  TTree *fTree;
  AliESDEvent *fESDEvent; 
  AliESDpid *fESDpid;              
  AliESDfriend     *fESDfriend;    

  TList *fHist;                       	

  ClassDef(AliAnalysisTaskESDTRDsignal, 0);
};
#endif

